package com.main.ok.schedule;

/**
 * 
 * @Type Main
 * @Desc
 * @author shuai.zuo
 * @date 2015年2月26日
 * @Version V1.0
 */
public class Main {
    public static final int a;
    static {
        a = 1;
        // a=2;
        // 常量只能被赋值一次,赋值第二次报错
    }

    public static void main(String[] args) {

        // System.out.println("hello");
        // System.out.println(a);
        String aa = "ff";
        // String s = "b" + aa;
        String s = new String("aa");
        String x = s.intern();
        String s1 = new String("aa");
        String y = s1.intern();
        String s2 = "aa";
        System.out.println(x == s2);
        System.out.println(s1 == y);
        // System.out.println(x == y);
        boolean ss = Thread.currentThread().holdsLock(s2);
        System.out.println(ss);
    }
}
